package com.serup.serviceImpl;

import java.util.List;
import com.serup.factory.DaoFactory;
import com.serup.bean.Expenditure;
import com.serup.bean.User;
import com.serup.daoIf.FinanceManagementDaoIf;
import com.serup.serviceIf.FinanceManagementServiceIf;
public class FinanceManagementServiceImpl implements FinanceManagementServiceIf {
	FinanceManagementDaoIf dao = DaoFactory.getInstance().getFinanceManagementDao();
	public boolean addExpenditure(Expenditure expenditure) {
		// TODO Auto-generated method stub
		boolean flag = dao.addExpenditure(expenditure);
		return flag;
	}

	public boolean deleteExpenditure(int id) {
		// TODO Auto-generated method stub
		boolean flag = dao.deleteExpenditure(id);
		return flag;
	}

	public List<Expenditure> selectAllExpenditure() {
		// TODO Auto-generated method stub
		List<Expenditure> ret = dao.selectAllExpenditure();
		return ret;
	}

	public Expenditure selectExpenditureById(int id) {
		// TODO Auto-generated method stub
		Expenditure ex = dao.selectExpenditureById(id);
		return ex;
	}

	public boolean updateExpenditure(Expenditure expenditure) {
		// TODO Auto-generated method stub
		boolean flag = dao.updateExpenditure(expenditure);
		return flag;
	}

}
